<?php 
include '../data/data.php';
$conn = new mysqli($config['ip'], $config['user'], $config['pass'], $config['data']);
$ID=str_replace(' ', '', $_GET['tc']);
if($ID=='0'){
}else{
	header('location:/index.html');
}
$fuwua=date("Y-m-d");
?>
<html><head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="keywords" content="H5 HTML5 H5游戏 HTML5游戏 小游戏 手机游戏 网页游戏 在线游戏 点击即玩 久乐游戏 久乐H5">
<meta name="description" content="久乐游戏是一个行业领先的H5在线游戏平台，玩游戏不再苦苦的等待下载，点击即玩。">
<title><?php echo $rowx[name]; ?>在线游戏平台</title>
<link rel="stylesheet" href="/public/styles/base.css">

    <link rel="stylesheet" href="/css/new.css">
    <link rel="stylesheet" href="/styles/ranking.css">
</head>
<body class="bg00">
    <!--div.container 总外框  start-->
    <div style="height: 50px;border-bottom: 1px solid #f4f4f4;border-top: 1px solid #f4f4f4;position: relative">
        <div class="gokb">
                            <a target="_top" href="/user/user.html">
                    <img src="/images/user_center/default_im.png" alt="">
                </a>
                    </div>
        <div class="search newser">
            <input type="text" id="search_ipt" placeholder="请输入搜索内容" autocomplete="on" class="left_input">
            <input type="submit" id="search_btn" class="search_icon" value="">
        </div>
    </div>
    <div class="z_container bg01" style="margin-top: 10px;">
        <!--div.z_min 内容区域 statr-->
        <div class="main">
            <section class="top_fexed">
                <nav class="ranking_nav" style="height: 50px;">
                    <a class="chose1" href="javascript:void(0)" style="width: 14%;height:35px;border: none;margin-bottom:0;font-size: 13px;margin-left: 10%;font-weight: bold;color: #333333">今日开服</a>
                    <a href="javascript:void(0)" style="width: 14%;height:35px;border: none;font-size: 13px;margin-bottom:0;margin-left: 19%;font-weight: bold;color: #333333" class="">已开新服</a>
                    <a href="javascript:void(0)" style="width: 14%;height:35px;border: none;font-size: 13px;margin-bottom:0;margin-left: 19%;font-weight: bold;color: #333333" class="">新服预告</a>
                    <div style="clear: both"></div>
                    <div style="width: 100%;height: 1px;background: #f4f4f4;"></div>
                </nav>
            </section>
            <!--div.game_list 区服列表  start-->
            <section class="game_list" style="height: auto;">
                <div class="swipe" id="slider" style="visibility: visible;">
                    <div class="slide_cont swipe-wrap" style="width: 1134px;">
                        <ul id="game_list_0" class="wrap" data-index="0" style="width: 378px; left: 0px; transition-duration: 300ms; transform: translate(0px, 0px) translateZ(0px);">
   <?php  
$result = $conn->query("SELECT id, logo, name, renqi, xingji, jianjie, date, Android, ios FROM games WHERE userid LIKE '%$dl%' AND date LIKE '%$fuwua%' ORDER BY id DESC");
 
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
            if($row[xingji]=='1'){
      $xj='<i class="icons i_start1"></i>';
      }elseif($row[xingji]=='2'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='3'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='4'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='5'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }
if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
  if($row[ios]!=''){
	$xz= '<a target="_top" onclick="countDownload(this,100)" href="'.$row[ios].'" class="btn_blue">点击下载</a>';
  }else{
  	$xz= '<a target="_top" onclick="countDownload(this,100)" href="#" class="btn_blue">暂无下载</a>';
  }
}else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
    if($row[Android]!=''){
	$xz= '<a target="_top" onclick="countDownload(this,100)" href="'.$row[Android].'" class="btn_blue">点击下载</a>';
  }else{
  	$xz= '<a target="_top" onclick="countDownload(this,100)" href="#" class="btn_blue">暂无下载</a>';
  }
}else{
    if($row_Recordset1[anzhuo]!=''){
	$xz= '<a target="_top" onclick="countDownload(this,100)" href="'.$row[Android].'" class="btn_blue">点击下载</a>';
  }else{
  	$xz= '<a target="_top" onclick="countDownload(this,100)" href="#" class="btn_blue">暂无下载</a>';
  }
}
        echo '<li style="">
    <section class="list_content">
        <div class="game_log relative">
            <a target="_top" href="javascript:void(0);"><img src="'.$row[logo].'" width="60" height="60" alt="'.$row['name'].'"></a>
        </div>
        <div class="game_info">
            <h3>
                <span><a target="_top" href="javascript:void(0);">'.$row['name'].'</a></span>
            </h3>
            <p style="font-size: 12px;color:#666666;margin: 6px 0;font-weight:500;">服务器： '.$row['name'].'新区</p>
                <p style="font-size: 12px;color:#666666;font-weight:500;">开服时间：<span style="color:#FE0000;float: none;">'.$row['date'].'</span></p>
        </div>
        <div class="game_btn">
    '.$xz.'
                    </div>
    </section>
</li>';
    }
}
?> 

                        </ul>
                        <ul id="game_list_2" class="wrap" data-index="2" style="width: 378px; left: -756px; transition-duration: 300ms; transform: translate(-378px, 0px) translateZ(0px);">
<!--------------------------------------->
                             <?php  
$result = $conn->query("SELECT id, logo, name, renqi, xingji, jianjie, date, Android, ios FROM games WHERE userid LIKE '%$dl%' ORDER BY id DESC");
 
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
            if($row[xingji]=='1'){
      $xj='<i class="icons i_start1"></i>';
      }elseif($row[xingji]=='2'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='3'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='4'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='5'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }
if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
  if($row[ios]!=''){
	$xz= '<a target="_top" onclick="countDownload(this,100)" href="'.$row[ios].'" class="btn_blue">点击下载</a>';
  }else{
  	$xz= '<a target="_top" onclick="countDownload(this,100)" href="#" class="btn_blue">暂无下载</a>';
  }
}else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
    if($row[Android]!=''){
	$xz= '<a target="_top" onclick="countDownload(this,100)" href="'.$row[Android].'" class="btn_blue">点击下载</a>';
  }else{
  	$xz= '<a target="_top" onclick="countDownload(this,100)" href="#" class="btn_blue">暂无下载</a>';
  }
}else{
    if($row_Recordset1[anzhuo]!=''){
	$xz= '<a target="_top" onclick="countDownload(this,100)" href="'.$row[Android].'" class="btn_blue">点击下载</a>';
  }else{
  	$xz= '<a target="_top" onclick="countDownload(this,100)" href="#" class="btn_blue">暂无下载</a>';
  }
}
        echo '<li style="">
    <section class="list_content">
        <div class="game_log relative">
            <a target="_top" href="javascript:void(0);"><img src="'.$row[logo].'" width="60" height="60" alt="'.$row['name'].'"></a>
        </div>
        <div class="game_info">
            <h3>
                <span><a target="_top" href="javascript:void(0);">'.$row['name'].'</a></span>
            </h3>
            <p style="font-size: 12px;color:#666666;margin: 6px 0;font-weight:500;">服务器： '.$row['name'].'新区</p>
                <p style="font-size: 12px;color:#666666;font-weight:500;">开服时间：<span style="color:#FE0000;float: none;">'.$row['date'].'</span></p>
        </div>
        <div class="game_btn">
    '.$xz.'
                    </div>
    </section>
</li>';
    }
}
?>  


                        </ul>
                    </div>
                </div>
            </section>
            <!--div.game_list 游戏列表  end-->
            <div class="footer_padding"></div>
        </div>
        <!--div.z_min 内容区域 end-->
    </div>
    <!--div.container 总外框  end-->
<!--footer 底部 start-->
<footer id="footer" class="z_footer" style="">
    <nav>
        <a target="_top" href="/index.html" style="margin-left: 2%;" >
            <p class="img_1"><img src="/picture/home.png" alt=""></p>
            <p class="img_2"><img src="/picture/home1.png" alt=""></p>
            <span>首页</span>
        </a>
        <a target="_top" href="/game/type.html?tc=GM" >
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>GM</span>
        </a>
        <a target="_top" href="/game/game.html?tc=rm" title="">
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>BT</span>
        </a>
        <a target="_top" href="/user/user.html" title="">
            <p class="img_1"><img src="/picture/user.png" alt=""></p>
            <p class="img_2"><img src="/picture/user1.png" alt=""></p>
            <span>我的</span>
        </a>
    </nav>
</footer>
<link href="/css/app.css" rel="stylesheet" type="text/css">
<div id="weixin_an" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="/public/channel/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="/public/channel/menu_android.png">打开菜单</span>
        <span class="span2 android_open"><em>2</em> 选择<img src="/public/channel/android.png"></span>
        <span class="span2 android_open"><em>3</em> 重新登录账号充值</span>
    </div>
</div>

<!--二维码-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.qrcode.min.js"></script>

<!--<div class="qrcode_image">-->
<!--        <img src="/qrcode/game.html?addr=--><!--">-->
<!--</div>-->
<script>

    /**
     * 统计
     */
    // var is_weixin = (function(){return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1})();
    // window.onload = function() {
    //     if (is_weixin) {
    //         $('#weixin_an').show();
    //     }
    // }
</script>

<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.mobile.min.js"></script>
<script src="/jquery/swipe.js"></script>
<script>$('#footer a:eq(3)').attr('id', 'footer_nav_active');</script>
<script>
$(function(){
	var nomore = '<label>没有更多数据了</label>';
    var current = 0;
    var pn = [0,0,0,0];
    var limit = 10;
    var loading = false;
    function tc()
    {
        if( loading ) return ;
        var t = $('#game_list_'+current);
        var l = t.children('li.loading');
        if( l.children('label').length > 0 ) return ;
        loading = true;
        ++pn[current];
    }
    tc();
    $(".loading").on('tap',function(){
        tc();
    });
    // $(window).on('scrollstop', function(){
    //     var t_h = $('.z_container').height();
    //     var c_h = $(document).scrollTop();
    //     if( c_h == 0 ) c_h = $('.z_container').scrollTop();
    //     c_h += $(window).height() + 10;
    //     if( c_h >= t_h ) {
    //         tc();
    //     }
    // });
    var slider = new Swipe(document.getElementById('slider'), {
        auto: false,
        continuous: true,
        disableScroll: false,
        stopPropagation: false,
        callback: function(index, element) {
            $(".ranking_nav a").eq(index).addClass("chose1").siblings().removeClass("chose1");
            current = index;
            tc();
        }
    });
    $(".ranking_nav a").on('tap',function(){
        $(this).addClass("chose1").siblings().removeClass("chose1");
        slider.slide($(this).index(), 300);
    });
    $(".game_list").css({height:'auto'});
});
</script>
    <script>
        $('#search_btn').on('tap', function(){
            var v = $.trim($('#search_ipt').val());
            v = v.replace(/[\'\"\?`~\!\$\%\^\*\(\)\[\]\{\}\-\+\\]+/, '');
            $('#search_ipt').val(v);
            if( v == '' ) {
                alert('请输入游戏名称、拼音或关键字！');
                $('#search_ipt').focus();
                return false;
            }
            location.href = '/search.html?search='+ encodeURIComponent(v);
        });
        $('#search_ipt').bind('keydown',function(event){
            if(event.keyCode == "13") {
                var v = $.trim($('#search_ipt').val());
                v = v.replace(/[\'\"\?`~\!\$\%\^\*\(\)\[\]\{\}\-\+\\]+/, '');
                $('#search_ipt').val(v);
                if( v == '' ) {
                    alert('请输入游戏名称、拼音或关键字！');
                    $('#search_ipt').focus();
                    return false;
                }
                location.href = '/search.html?search='+ encodeURIComponent(v);
            }
        });
        $("#search_ipt").mousedown(function(){
            $('.history').css("display","block");;
        });
    </script>

</body></html>